Skip to content

Fix Sentry privacy for oversized structured logs - #441

Merged
lesnik512 merged 1 commit into
mainfrom
fix/sentry-oversized-logs
Nov 4, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/sentry-oversized-logs

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Sentry truncates rendered JSON before before_send, which could bypass structured-field redaction and skip_sentry for oversized logs. Parse the complete original LogRecord when available, retaining the event fallback and ordinary stdlib truncation.

Regression tests verify final serialized-envelope redaction and suppression across the configured string limit, with stacktraces on and off. They also check stdout, stored exception metadata, and callback order.

Closes #432.

Validation:

  • Full suite: 636 passed, 100% coverage.
  • Sentry tests: 52 passed on both 2.70.0 and 2.73.0.
  • Tracked-file formatting, lint, and type checks passed. The pre-existing untracked research note prevents the workspace-wide formatting check from passing; it is excluded from this PR.
  • Standards and spec reviews: no findings.

@lesnik512
lesnik512 merged commit e0b2065 into main Nov 4, 2026
35 checks passed
@lesnik512
lesnik512 deleted the fix/sentry-oversized-logs branch November 4, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P1] Preserve Sentry redaction and skip_sentry for oversized structured logs

1 participant